package com.clz.hyperit.service;

import java.util.List;

import com.clz.hyperit.entity.Article;
import com.clz.hyperit.entity.Tag;
import com.clz.hyperit.vo.PageInfo;

public interface ArticleService {
	//分页查询所有文章
	public List<Article> findArticle(PageInfo pageInfo,Integer status);
	//查询个人所有文章
	public List<Article> findPersonArticle(Integer id, PageInfo pageInfo,
			Integer status);
	//发布文章
	public Integer saveArticle(Integer id, Article article,
			Integer status);
	//查找1篇文章
	public Article findOneArticle(Integer id);
	//删除文章 删除相关tagArticle tag的数量文章数量-1
	public void deleteArticle(Integer article_id);
	//更新文章
	public void updateArticle(Article article);
	//更新文章信息
	public Article updateArticleInfo(Integer userdetail_id, Article article,
			Integer status);
	public void updateTagArticle(List<Tag> tag_list);
	//获取收藏状态
	public boolean getCollection(Integer article_id, Integer userdetail_id);
	//获取关注状态
	public boolean getFollow(Integer blog_id, Integer userdetail_id);
	
	public List<Article> getArticleByRead(PageInfo pageInfo, Integer status);
	
	public List<Article> getArticleByCollect(PageInfo pageInfo, Integer status);
	
	public List<Article> getArticleByReward(PageInfo pageInfo, Integer status);
	//搜索
	public List<Article> searchArticle(PageInfo pageInfo, String search);

}
